/*
*ScreenBar
*chenjie
*2012-5-5
*/
package com.player
{
	import com.event.PlayerEvent;
	
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	public class ScreenBar extends Sprite
	{
		private var bg:Shape
		private var screenMc:PlayingScreenBtn
		public function ScreenBar()
		{
			super();
			bg=new Shape()
				
			screenMc=new PlayingScreenBtn()
			addChild(screenMc)
			screenMc.zoom_mc.zoom1_mc.addEventListener(MouseEvent.CLICK,doClick_1)
			screenMc.zoom_mc.zoom2_mc.addEventListener(MouseEvent.CLICK,doClick_2)
			screenMc.zoom_mc.zoom3_mc.addEventListener(MouseEvent.CLICK,doClick_3)
			screenMc.visible=false
		}
		
		public function showScreenMc():void{
			screenMc.visible=true
			this.x=(stage.fullScreenWidth-this.width)/2
		}
		
		public function hide():void{
			screenMc.visible=false
		}
		
		public function doClick_1(e:MouseEvent):void{
		  dispatchEvent(new PlayerEvent(PlayerEvent.SET_SCALE,0.5))
		}
		
		public function doClick_2(e:MouseEvent):void{
			dispatchEvent(new PlayerEvent(PlayerEvent.SET_SCALE,0.75))
		}
		
		public function doClick_3(e:MouseEvent):void{
			dispatchEvent(new PlayerEvent(PlayerEvent.SET_SCALE,1))
		}
		
	}
}